{extend name="template/base" /}
{block name="nav"}{/block}
{block name="content"}
<div class="page-container">
    <form class="form form-horizontal" id="form" method="post" action="{:\\think\\Request::instance()->baseUrl()}">
        <input type="hidden" name="id" value="{$vo.id ?? ''}">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>项目名称：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.name ?? ''}" placeholder="颐和家园4期" name="name">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">海报1：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" id="upload" placeholder="请点击后面的上传按钮" name="poster" value="{$vo.poster ?? ''}" style="width: 70%">
                <button type="button" class="btn btn-primary radius" onclick="layer_open('文件上传','{:\\think\\Url::build(\'Upload/index\', [\'id\' => \'upload\'])}')">上传</button>
                <a onclick="$(this).attr('href', $('#upload').val())" type="button" class="btn btn-success radius" data-lightbox="preview">预览</a>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">海报2：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" id="upload2" placeholder="请点击后面的上传按钮" name="img" value="{$vo.img ?? ''}" style="width: 70%">
                <button type="button" class="btn btn-primary radius" onclick="layer_open('文件上传','{:\\think\\Url::build(\'Upload/index\', [\'id\' => \'upload2\'])}')">上传</button>
                <a onclick="$(this).attr('href', $('#upload2').val())" type="button" class="btn btn-success radius" data-lightbox="preview">预览</a>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>项目类型：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.type ?? ''}" placeholder="商业住宅" name="type">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>参考均价：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.price ?? ''}" placeholder="27000元/m2" name="price">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>交付状态：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.project_status ?? ''}" placeholder="已交付" name="project_status">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>交付时间：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.time ?? ''}" placeholder="2018-01-01" name="time">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>物业：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.wuye ?? ''}" placeholder="熊猫物业" name="wuye">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>联系电话：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.tel ?? ''}" placeholder="025-86657777" name="tel">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>地址：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" value="{$vo.address ?? ''}" placeholder="江苏省南京市栖霞区华电路1号" name="address">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3">描述：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <textarea class="textarea" placeholder="" name="description" onKeyUp="textarealength(this,100)">{$vo.description ?? ''}</textarea>
                <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <button type="submit" class="btn btn-primary radius">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                <button type="button" class="btn btn-default radius ml-20" onClick="layer_close();">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </form>
</div>
{/block}
{block name="style"}
<link rel="stylesheet" href="__LIB__/lightbox2/css/lightbox.min.css">
{/block}
{block name="script"}
<script src="__LIB__/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="__LIB__/Validform/5.3.2/Validform.min.js"></script>
<script>
    $(function () {
        $("[name='status'][value='{$vo.status ?? '1'}']").attr("checked",true);

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form").Validform({
            tiptype:2,
            ajaxPost:true,
            showAllError:true,
            callback:function(ret){
                ajax_progress(ret);
            }
        });
    })
</script>
{/block}